package com.innoking.docsys.user.controller;

import com.innoking.docsys.user.service.GetPyToNplService;
import com.innoking.docsys.utils.ResultObjVO;
import com.innoking.docsys.utils.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: controller.getPyToNpl
 * Function:  TODO
 * Date:      2019/8/22 8:56
 * author     yeruixaing
 * QQ:        3141684159
 * version    V1.0
 */
@RestController
@RequestMapping(value = "/getPyToNpl", method = RequestMethod.GET)
public class GetPyToNpl {

    @Autowired
    private GetPyToNplService getPyToNplService;

    //获取python接口并处理数据
    @RequestMapping(value = "/getPy")
    public ResultObjVO getPyToNpl() {
        String str = getPyToNplService.getPyToNpl();
        if (!"创建文件完成".equals(str)) {
            return ResultUtil.error("创建文件失败");
        }
        return ResultUtil.success();
    }

}
